package edu.geo.common.db;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

/**
 * 
 * @author alejandro.sanchez
 * 
 * Permite la lectura de los parámetros de la base de datos para pruebas.
 *
 */
public class DBConfigReader {
	private static final String BUNDLE_NAME = "dbProperties"; //$NON-NLS-1$

	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
			.getBundle(BUNDLE_NAME);

	private DBConfigReader() {
	}

	public static String getString(String key) {
		try {
			return RESOURCE_BUNDLE.getString(key);
		} catch (MissingResourceException e) {
			return '!' + key + '!';
		}
	}
}
